<template>
	<!-- 数据展示 -->
	<view class="property">
				  <view class="property_t">
					  <view class="flex2">
						  <view>总资产</view>
						  <view class="flex1" @click="isloginFn">
							  <view>查看明细</view>
							  <uni-icons type="right"  color="#fff" size="15"></uni-icons>
						  </view>
					  </view>
					  <view class="property_money">{{appuserInfo.szWalletBalance}}</view>
					  <!-- <view>累计收益（元）{{appuserInfo.totalRevenue}}</view> -->
				  </view>
				  <view class="flex2 property_b">
					  <view>可提现（元）{{appuserInfo.szWithdrawalBalance}}</view>
					  <view class="flex" @click="drawFn">
						  <view>可提现余额明细</view>
						  <uni-icons type="right" size="15" color='#f8a6b8'></uni-icons>
					  </view>
				  </view>
				  <view class=" property_b">
					  <view>当前能量值  {{appuserInfo.szEnergy}}</view>
					  <view class="flex" @click="withdrawalFn" style="margin-top: 20rpx;">
						  <view>提现记录</view>
						  <uni-icons type="right" size="15" color='#f8a6b8'></uni-icons>
					  </view>
				  </view>
	</view>
</template>

<script setup>
  import { computed ,ref,reactive,toRefs,onMounted} from 'vue';
  import { onLoad,onShow, onPageScroll, onPullDownRefresh } from '@dcloudio/uni-app';
  import sheep from '@/sheep';
  
  
   const appuserInfo=ref({});
  onLoad(()=>{
	 sheep.$store('user').getUserInfo()
  })
  onShow(()=>{
	  getInfo()
	  
  })
  
  const getInfo=()=>{
	  sheep.$api.login.userInfo().then(res=>{
	  		  console.log('res','11111');
	  		  appuserInfo.value=res.data.userInfo
	  })
  }
  
  
   const isloginFn=()=>{
	   uni.navigateTo({
	   	url:'/pages/index/balancelist'
	   })
   }
   const drawFn=()=>{
   	   uni.navigateTo({
   	   	url:'/pages/index/drawalBalance'
   	   })
   }
   const withdrawalFn=()=>{
   	   uni.navigateTo({
   	   	url:'/pages/index/userInfo/drawlist'
   	   })
   }
   
  
</script>

<style lang="scss" scoped>
	.flex1{
		display: flex;
		align-items: center;
	}
	.flex2{
		display: flex;
		align-items: center;
		justify-content: space-between;
	}
	.property{
		margin: 50rpx 30rpx 30rpx 30rpx;
		border-radius: 30rpx;
		box-shadow: 0 0 20rpx 20rpx #f1e2e9;
		font-size: 28rpx;
	  
		.property_t{
			color: #fff;
			border-radius: 30rpx 30rpx 0 0;
			padding: 30rpx;
			background-image: linear-gradient(90deg,#f892a9,#f8a3b6,#f8b7c7,#f8c9d5,#f8d2db);
			
			.property_money{
				font-size: 36rpx;
				font-weight: 700;
				margin: 25rpx 0;
			}
		}
		
		.property_b{
			padding: 30rpx;
			color:#ff658b;
			font-weight: 700;
			border-radius:  0 0 30rpx 30rpx;
			background-color: #fff;
			.icon{
				margin: 0 10rpx;
			}
		}
	}
</style>